.class Lcom/example/inshopbuy/ConsumeInShop$2;
.super Ljava/lang/Object;
.source "ConsumeInShop.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/inshopbuy/ConsumeInShop;->makeOrder()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/inshopbuy/ConsumeInShop;


# direct methods
.method constructor <init>(Lcom/example/inshopbuy/ConsumeInShop;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    .line 334
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 11

    .prologue
    .line 337
    iget-object v8, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->context:Landroid/content/Context;
    invoke-static {v8}, Lcom/example/inshopbuy/ConsumeInShop;->access$1(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/content/Context;

    move-result-object v8

    const-string v9, "userInfo"

    const/4 v10, 0x0

    invoke-virtual {v8, v9, v10}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v4

    .line 338
    .local v4, "sharedPreferences":Landroid/content/SharedPreferences;
    const-string v8, "uid"

    const-string v9, ""

    invoke-interface {v4, v8, v9}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 341
    .local v6, "uid":Ljava/lang/String;
    iget-object v8, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->true_money:Landroid/widget/TextView;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$26(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/widget/TextView;

    move-result-object v9

    invoke-virtual {v9}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v9

    invoke-interface {v9}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$27(Lcom/example/inshopbuy/ConsumeInShop;Ljava/lang/String;)V

    .line 342
    new-instance v8, Ljava/lang/StringBuilder;

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->m:Lmyapp/MyApp;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$28(Lcom/example/inshopbuy/ConsumeInShop;)Lmyapp/MyApp;

    move-result-object v9

    invoke-virtual {v9}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "/index.php?ctrl=app&action=makeshophuiorder&uid="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&shopid="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->shopid:Ljava/lang/String;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$29(Lcom/example/inshopbuy/ConsumeInShop;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 343
    const-string v9, "&huiid="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->consumBean:Lcom/example/inshopbuy/ConsumBean;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$21(Lcom/example/inshopbuy/ConsumeInShop;)Lcom/example/inshopbuy/ConsumBean;

    move-result-object v9

    invoke-virtual {v9}, Lcom/example/inshopbuy/ConsumBean;->getId()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&xfcost="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->allconsume:Landroid/widget/EditText;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$30(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/widget/EditText;

    move-result-object v9

    invoke-virtual {v9}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v9

    invoke-interface {v9}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&yhcost="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->allconsume:Landroid/widget/EditText;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$30(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/widget/EditText;

    move-result-object v9

    invoke-virtual {v9}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v9

    invoke-interface {v9}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Ljava/lang/Float;->valueOf(Ljava/lang/String;)Ljava/lang/Float;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/Float;->floatValue()F

    move-result v9

    iget-object v10, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->truecost:Ljava/lang/String;
    invoke-static {v10}, Lcom/example/inshopbuy/ConsumeInShop;->access$12(Lcom/example/inshopbuy/ConsumeInShop;)Ljava/lang/String;

    move-result-object v10

    invoke-static {v10}, Ljava/lang/Float;->valueOf(Ljava/lang/String;)Ljava/lang/Float;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/Float;->floatValue()F

    move-result v10

    sub-float/2addr v9, v10

    invoke-static {v9}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&sjcost="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->true_money:Landroid/widget/TextView;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$26(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/widget/TextView;

    move-result-object v9

    invoke-virtual {v9}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v9

    invoke-interface {v9}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&paytype="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->choice_pay_name:Ljava/lang/String;
    invoke-static {v9}, Lcom/example/inshopbuy/ConsumeInShop;->access$31(Lcom/example/inshopbuy/ConsumeInShop;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&datatype=json"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 342
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 345
    .local v7, "url":Ljava/lang/String;
    iget-object v8, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->m:Lmyapp/MyApp;
    invoke-static {v8}, Lcom/example/inshopbuy/ConsumeInShop;->access$28(Lcom/example/inshopbuy/ConsumeInShop;)Lmyapp/MyApp;

    move-result-object v8

    invoke-static {v7, v8}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v5

    .line 346
    .local v5, "str":Ljava/lang/String;
    const-string v8, "makeOrder------->>>"

    invoke-static {v8, v7}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 348
    :try_start_0
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3, v5}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 349
    .local v3, "object":Lorg/json/JSONObject;
    const-string v8, "error"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    const-string v9, "true"

    invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-eqz v8, :cond_0

    .line 350
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 351
    .local v2, "message":Landroid/os/Message;
    const/4 v8, 0x6

    iput v8, v2, Landroid/os/Message;->arg1:I

    .line 352
    const-string v8, "msg"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    iput-object v8, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 353
    iget-object v8, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->h:Landroid/os/Handler;
    invoke-static {v8}, Lcom/example/inshopbuy/ConsumeInShop;->access$32(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/os/Handler;

    move-result-object v8

    invoke-virtual {v8, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 372
    .end local v2    # "message":Landroid/os/Message;
    .end local v3    # "object":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 359
    .restart local v3    # "object":Lorg/json/JSONObject;
    :cond_0
    const-string v8, "msg"

    invoke-virtual {v3, v8}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v8

    const-string v9, "orderid"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 360
    .local v1, "madeorderid":Ljava/lang/String;
    const-string v8, "madeorderid--------"

    invoke-static {v8, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 361
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 363
    .restart local v2    # "message":Landroid/os/Message;
    iput-object v1, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 364
    const/4 v8, 0x3

    iput v8, v2, Landroid/os/Message;->arg1:I

    .line 365
    iget-object v8, p0, Lcom/example/inshopbuy/ConsumeInShop$2;->this$0:Lcom/example/inshopbuy/ConsumeInShop;

    # getter for: Lcom/example/inshopbuy/ConsumeInShop;->h:Landroid/os/Handler;
    invoke-static {v8}, Lcom/example/inshopbuy/ConsumeInShop;->access$32(Lcom/example/inshopbuy/ConsumeInShop;)Landroid/os/Handler;

    move-result-object v8

    invoke-virtual {v8, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 367
    .end local v1    # "madeorderid":Ljava/lang/String;
    .end local v2    # "message":Landroid/os/Message;
    .end local v3    # "object":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 369
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_0
.end method
